package com.situ.entity;

import com.alibaba.fastjson.JSONObject;

import java.util.*;

/**
 * IV_OutInvoice实体类
 *
 * @author
 */
public class IvOutinvoice {
    /***/
    private Object ID;
    /***/
    private String EmpID;
    /***/
    private Integer InID;
    /***/
    private String StartNo;
    /***/
    private String EndNo;
    /***/
    private Integer Counts;
    /***/
    private Date OutDate;
    /***/
    private Integer OutEmpID;
    private IvInvoice ivInvoice;
    private IvIninvoice ivIninvoice;
    private SyEmp syEmp;

    public SyEmp getSyEmp() {
        return syEmp;
    }

    public void setSyEmp(SyEmp syEmp) {
        this.syEmp = syEmp;
    }

    public IvIninvoice getIvIninvoice() {
        return ivIninvoice;
    }

    public void setIvIninvoice(IvIninvoice ivIninvoice) {
        this.ivIninvoice = ivIninvoice;
    }

    /**
     * 实例化
     */
    public IvOutinvoice() {
        super();
    }

    /**
     * 实例化
     *
     * @param obj
     */
    public IvOutinvoice(JSONObject obj) {
        this();
        this.setID(obj.get("ID"));

        if (obj.get("InID") instanceof Number) {
            this.setInID(((Number) obj.get("InID")).intValue());
        }
        if (obj.get("StartNo") instanceof String) {
            this.setStartNo((String) obj.get("StartNo"));
        }
        if (obj.get("EndNo") instanceof String) {
            this.setEndNo((String) obj.get("EndNo"));
        }
        if (obj.get("Counts") instanceof Number) {
            this.setCounts(((Number) obj.get("Counts")).intValue());
        }

        if (obj.get("OutEmpID") instanceof Number) {
            this.setOutEmpID(((Number) obj.get("OutEmpID")).intValue());
        }
    }

    /**
     * 将当前对象转换为JsonObject
     *
     * @return
     */
    public JSONObject toJson() {
        JSONObject result = new JSONObject();
        if (this.getID() != null) {
            result.put("ID", this.getID());
        }

        if (this.getInID() != null) {
            result.put("InID", this.getInID());
        }
        if (this.getStartNo() != null) {
            result.put("StartNo", this.getStartNo());
        }
        if (this.getEndNo() != null) {
            result.put("EndNo", this.getEndNo());
        }
        if (this.getCounts() != null) {
            result.put("Counts", this.getCounts());
        }
        if (this.getOutDate(new Date()) != null) {
            result.put("OutDate", this.getOutDate(new Date()));
        }
        if (this.getOutEmpID() != null) {
            result.put("OutEmpID", this.getOutEmpID());
        }
        return result;
    }

    public IvInvoice getIvInvoice() {
        return ivInvoice;
    }

    public void setIvInvoice(IvInvoice ivInvoice) {
        this.ivInvoice = ivInvoice;
    }

    /**
     * 获取ID
     *
     * @return
     */
    public Object getID() {
        return ID;
    }

    /**
     * 设置ID
     *
     * @param ID
     */
    public void setID(Object ID) {
        this.ID = ID;
    }

    /**
     * 获取EmpID
     *
     * @return
     */


    /**
     * 获取InID
     *
     * @return
     */
    public Integer getInID() {
        return InID;
    }

    /**
     * 设置InID
     *
     * @param InID
     */
    public void setInID(Integer InID) {
        this.InID = InID;
    }

    /**
     * 获取StartNo
     *
     * @return
     */
    public String getStartNo() {
        return StartNo;
    }

    /**
     * 设置StartNo
     *
     * @param StartNo
     */
    public void setStartNo(String StartNo) {
        this.StartNo = StartNo;
    }

    /**
     * 获取EndNo
     *
     * @return
     */
    public String getEndNo() {
        return EndNo;
    }

    /**
     * 设置EndNo
     *
     * @param EndNo
     */
    public void setEndNo(String EndNo) {
        this.EndNo = EndNo;
    }

    /**
     * 获取Counts
     *
     * @return
     */
    public Integer getCounts() {
        return Counts;
    }

    /**
     * 设置Counts
     *
     * @param Counts
     */
    public void setCounts(Integer Counts) {
        this.Counts = Counts;
    }

    public String getEmpID() {
        return EmpID;
    }

    public void setEmpID(String empID) {
        EmpID = empID;
    }

    public Date getOutDate() {
        return OutDate;
    }

    /**
     * 获取OutDate
     *
     * @param date
     * @return
     */
    public Date getOutDate(Date date) {
        return OutDate;
    }

    public void setOutDate(Date outDate) {
        OutDate = outDate;
    }

    /**
     * 获取OutEmpID
     *
     * @return
     */
    public Integer getOutEmpID() {
        return OutEmpID;
    }

    /**
     * 设置OutEmpID
     *
     * @param OutEmpID
     */
    public void setOutEmpID(Integer OutEmpID) {
        this.OutEmpID = OutEmpID;
    }

    @Override
    public String toString() {
        return "IvOutinvoice [ID=" + ID + " , EmpID=" + EmpID + " , InID=" + InID + " , StartNo=" + StartNo + " , EndNo=" + EndNo + " , Counts=" + Counts + " , OutDate=" + OutDate + " , OutEmpID=" + OutEmpID + "  ]";

    }


}
